<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>echarts</title>
    <script src="../../frame/echarts3/echarts.js"></script>
    <script src="../../js/echarts/echartData.js"></script>
</head>
<body>
<div id="demo" style="width: 400px;height: 300px">

</div>
<script>
    var data = [
        {value:335, name:'直接访问'},
        {value:310, name:'邮件营销'},
        {value:234, name:'联盟广告'},
        {value:135, name:'视频广告'},
        {value:1548, name:'搜索引擎'}
    ];
    function init() {
        var m =echarts.init(document.getElementById('demo'));
        m.clear();
        m.hideLoading();
        m.setOption(dataEchart.pieData(data));
    }
    init();
</script>
</body>
</html>